//
//  RVideoObj.h
//  iMoive
//
//  Created by 侯伟 on 2021/8/25.
//

#import <Foundation/Foundation.h>
#import <Realm/Realm.h>


NS_ASSUME_NONNULL_BEGIN

@interface RVideoUrlObj : NSObject

@property(nonatomic,assign)NSInteger index;

//// 播放地址
//@property(nonatomic,copy)NSString* url;

/// 视频地址
@property(nonatomic,copy)NSString* url_m3u8;

/// 集数
@property(nonatomic,copy)NSString* url_num;

/// 信息
@property(nonatomic,copy)NSString* url_info;

@end


@interface RVideoUrlGroup : NSObject

/// 排序
@property(nonatomic,assign) NSInteger index;

/// 名称
@property(nonatomic,copy)NSString* title;

/// 所有的剧集地址
@property(nonatomic,strong)NSArray<RVideoUrlObj *> *urls;

@end


@interface RVideoObj : RLMObject

///id
@property(nonatomic,copy)NSString* id;

///视频名
@property(nonatomic,copy)NSString* name;

/// 视频封面图链接
@property(nonatomic,copy)NSString* img;

/// 视频年代分类
@property(nonatomic,copy)NSString* year;

/// 分类
@property(nonatomic,assign)NSInteger channel_id;

/// 视频题材大栏目分类，如 电影，电视剧，动漫，综艺
@property(nonatomic,copy)NSString* channel1_id;

/// 视频题材分类，如战争片，喜剧片，爱情片，记录片
@property(nonatomic,copy)NSString* channel2_id;

/// 视频地区分类，如大陆，香港，日本，美国
@property(nonatomic,copy)NSString* channel3_id;

/// 导演名
@property(nonatomic,copy)NSString* director;

/// 主演名
@property(nonatomic,copy)NSString* actors;

/// 信息
@property(nonatomic,copy)NSString* info;

/// 视频介绍
@property(nonatomic,copy)NSString* dess;

#pragma mark -- 收藏

/// 是否收藏
@property(nonatomic,assign)BOOL isCollect;

#pragma mark -- 播放记录

/// 是否播放过
@property(nonatomic,assign)BOOL isPlayed;

/// 播放时长
@property(nonatomic,assign)NSTimeInterval currentTime;

/// 总时长
@property(nonatomic,assign)NSTimeInterval totalTime;

/// 链路
@property(nonatomic,assign)NSInteger col;

/// 集
@property(nonatomic,assign)NSInteger row;

/// 集名称
@property(nonatomic,copy)NSString* dramaName;

/// 最后一次播放时间
@property(nonatomic,strong)NSDate* lastPlayDate;


#pragma mark -- local

/// 视频点播链接
@property(nonatomic,strong)NSArray<RVideoUrlGroup *> *urls;

/// 选中
@property(nonatomic,assign)BOOL isSelected;


@end

RLM_ARRAY_TYPE(RVideoObj)




NS_ASSUME_NONNULL_END

